/*
 * 组织/职务 API
 *
 * @author tqfeiyang
 * @since 2024-09-19
 */

import { postRequest, getRequest } from '/@/lib/axios';

export const employeeApi = {
    // 职务-分页查询
    getEmployeePage(params) {
        return getRequest('@/api/business/organization/employee/getEmployeePage', params);
    },

    // 职务-获取全部
    getAllEmployeeList() {
        return getRequest('@/api/business/organization/employee/getAllEmployeeList');
    },

    // 职务-获取详情
    getEmployeeInfo(employeeId) {
        return getRequest(`@/api/business/organization/employee/getEmployeeInfo/${employeeId}`);
    },

    // 职务-添加
    createEmployee(data) {
        return postRequest('@/api/business/organization/employee/createEmployee', data);
    },

    // 职务-修改
    updateEmployee(employeeId, data) {
        return postRequest(`@/api/business/organization/employee/updateEmployee/${employeeId}`, data);
    },

    // 职务-删除
    deleteEmployee(employeeId) {
        return postRequest(`@/api/business/organization/employee/deleteEmployee/${employeeId}`);
    },

    // 职务-批量删除
    batchDeleteEmployees(employeeIds) {
        return postRequest('@/api/business/organization/employee/batchDeleteEmployees', employeeIds);
    },

    // 职务-导出Excel
    exportEmployeeExcel() {
        return getRequest('@/api/business/organization/employee/exportEmployeeExcel');
    },
};
